Passed
Push — master ( 7aa1e4...a37cc0 )
by Kevin Van
05:30
created

IndexPage   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 41
dl 0
loc 46
c 0
b 0
f 0
rs 10

3 Functions

Rating   Name   Duplication   Size   Complexity  
A renderMatchSlider 0 4 1
A renderMakroArticle 0 24 1
A renderWebsiteFeedbackArticle 0 12 1
1
import { graphql } from "gatsby"
2
import React, { Component, Fragment } from "react"
3
4
import { CardImage } from "../components/Card"
5
import Card from "../components/Card"
6
import KcvvTvOverview from "../components/KcvvTvOverview"
7
import MatchesOverview from "../components/MatchesOverview"
8
import MatchesSlider from "../components/MatchesSlider"
9
import MatchesTabs from "../components/MatchesTabs"
10
import UpcomingEvent from "../components/UpcomingEvent.tsx"
11
import { NewsItemFeatured, NewsItemCardRatio } from "../components/news-item"
12
import SEO from "../components/seo"
13
import MyMakro from "../images/tag-mymakro.png"
14
import Trooper from "../images/tag-trooper.png"
15
import Layout from "../layouts/index"
16
17
class IndexPage extends Component {
18
  renderMatchSlider = () => (
19
    <section className={`grid-container full`}>
20
      <MatchesSlider />
21
    </section>
22
  )
23
24
  renderMakroArticle = () => (
25
    <Card className={`medium-6 large-12 cell card`} title="MyMakro">
26
      <p>
27
        Link nu jouw Makro voordeelkaart aan onze vereniging. Bij elke aankoop bij Makro en partners steun je KCVV
28
        Elewijt!
29
      </p>
30
      <p>
31
        <img src={MyMakro} alt="QR Code MyMakro" style={{ width: `100%` }} />
32
      </p>
33
      <p>
34
        Scan bovenstaande QR-code met je camera op GSM, of surf naar{` `}
35
        <a
36
          href="https://my.makro.be/nl/link-vereniging/02277464"
37
          target="_blank"
38
          rel="noopener noreferrer"
39
          title="MyMakro link voor KCVV Elewijt"
40
          className={`rich-link`}
41
        >
42
          https://my.makro.be/nl/link-vereniging/02277464
43
        </a>
44
        .
45
      </p>
46
      <p>Onze vereniging dankt jullie van harte!</p>
47
    </Card>
48
  )
49
50
  renderWebsiteFeedbackArticle = () => (
51
    <Card className={`medium-6 large-12 cell card`} title="Website feedback" titleIcon="fa-commenting-o">
52
      <p>
53
        Na lang zwoegen is onze nieuwe website eíndelijk online geraakt! We zijn heel benieuwd naar jullie mening of
54
        feedback. Als jullie vinden dat er iets ontbreekt, of als je bepaalde fouten tegenkomt, zouden we het ten
55
        zeerste appreciëren als je ons even iets laat weten op{` `}
56
        <a href="mailto:[email protected]" className={`rich-link`}>
57
          [email protected]
58
        </a>
59
        !
60
      </p>
61
    </Card>
62
  )
63
}
64
65
export const pageQuery = graphql`
66
  query {
67
    featuredPosts: allNodeArticle(
68
      filter: { status: { eq: true }, promote: { eq: true } }
69
      sort: { fields: created, order: DESC }
70
      limit: 12
71
    ) {
72
      edges {
73
        node {
74
          id
75
          path {
76
            alias
77
          }
78
          created(formatString: "D/M/YYYY")
79
          changed(formatString: "D/M/YYYY")
80
          timestamp: changed(formatString: "x")
81
          title
82
          promote
83
          status
84
          field_featured
85
          body {
86
            value
87
            format
88
            processed
89
            summary
90
          }
91
          relationships {
92
            field_media_article_image {
93
              ...ArticleImage
94
            }
95
            field_tags {
96
              name
97
              path {
98
                alias
99
              }
100
            }
101
          }
102
          internal {
103
            type
104
          }
105
        }
106
      }
107
    }
108
    preseason: file(name: { eq: "preseason2020-2021" }) {
109
      ...KCVVFluid960
110
    }
111
    featuredPlayer: allNodePotw(sort: { fields: created, order: DESC }, filter: { status: { eq: true } }, limit: 1) {
112
      edges {
113
        node {
114
          relationships {
115
            field_player {
116
              field_firstname
117
              field_lastname
118
              field_shirtnumber
119
              field_position
120
              relationships {
121
                field_image {
122
                  localFile {
123
                    ...KCVVFixedPlayerTeaser
124
                  }
125
                }
126
              }
127
              path {
128
                alias
129
              }
130
            }
131
          }
132
        }
133
      }
134
    }
135
  }
136
`
137
138
export default IndexPage
139